package main

import (
	"discuz/models"
	_ "discuz/routers"
	"github.com/astaxie/beego"
	"github.com/astaxie/beego/logs"
	"github.com/astaxie/beego/orm"
	"time"
)

func init() {
	beego.BConfig.WebConfig.Session.SessionOn = true
	beego.BConfig.WebConfig.Session.SessionGCMaxLifetime = 86400
	beego.BConfig.WebConfig.Session.SessionProvider = "file"
	beego.BConfig.WebConfig.Session.SessionProviderConfig = "./tmp"
	orm.DefaultTimeLoc = time.UTC
	logs.SetLogger(logs.AdapterFile, `{"filename":"./logs/wechat.log"}`)
	logs.EnableFuncCallDepth(true)
}

func main() {
	models.Init()
	beego.Run()
}
